package com.example.forum.services;

import com.example.forum.model.Message;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMessageService {
    void create(Message message);

    Message selectById(Long id);

    int selectUnreadCount(Long receiveUserId);

    List<Message> selectByReceiveUserId(Long receiveUserId);

    void updateStateById(Long id,Byte state);

    @Transactional
    void reply(Long repliedId,Message message);
}
